#include<bits/stdc++.h>

using namespace std;

int main() {
    int a[11] = {3, 5, 8, 11, 2, 6, 8, 9, 11, 15, 20}, c[11], i, j, k;
    i = 0;
    j = 4;
    k = 0;
    while (i < 4 && j < 11) {
        if (a[i] <= a[j]) {
            c[k++] = a[i++];
        } else {
            c[k++] = a[j++];
        }
    }
    while (i < 4)c[k++] = a[i++];
    while (j < 11)c[k++] = a[j++];

    for (int x = 0; x < k; x++) {
        cout << c[x] << " ";
    }
    return 0;
}